<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link rel="stylesheet/less" href="./less/reset.less">
    <link rel="stylesheet/less" href="./less/setPassword.less">
    <script src="https://cdn.bootcdn.net/ajax/libs/less.js/4.1.1/less.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/qs/6.9.6/qs.js"></script>
    <script src="http://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
    <title></title>
</head>
<body>
    <div id="app">
        <div class="main">
            <div class="login-top">
                <header class="title">
                    <div class="spell">设置密码</div>
                    <div @click="spellDeals">
                        <img src="./img/arrow_back.png"/>
                    </div>    
                </header>
            </div>
            <div class="message">
                <ul v-for="(item,index) in setting" @click="settingPassword(index)">
                    <li>{{item.setPassword}}</li>
                    <li>
                        <img src="./img/arrow_right.png"/>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</body>
</html>
<script type="module">
    import { shareLink } from './js/public.js';
    Vue.prototype.public = {shareLink};
    let app = new Vue({
        el: '#app',
        data: {
            setting:[
                {
                    setPassword: '修改支付密码',

                },
                {
                    setPassword: '修改登录密码',
                }
            ],
        },
        mounted(){
           let that = this;
               that.public.shareLink();
              
        },
        methods:{

            settingPassword(index){
                console.log(index);
                if(index==0){
                    let url = './payment.html';
                        window.location.href = url;
                }else{
                    let url = './loginPassword.html';
                        window.location.href = url;
                }
            },
            spellDeals(){
                let url = './mine.html';
                    window.location.href = url;
            },
        }
    })
</script>